<template>
  <div class="app-container">
    <el-tabs type="border-card" @tab-click="changeHeight">
      <el-tab-pane label="卡片视图">
        <div id="myForm">
          <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="40px"
                   class="formClass">
            <el-form-item label="地址" prop="petAddress">
              <el-input
                v-model="queryParams.petAddress"
                placeholder="请输入地址"
                clearable
                size="small"
                style="width: 200px"
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="来源" prop="petSource">
              <el-input
                v-model="queryParams.petSource"
                placeholder="请输入来源信息"
                clearable
                size="small"
                style="width: 200px"
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="品种" prop="petKind">
              <treeselect v-model="queryParams.petKind" style="width: 200px" :defaultExpandLevel=1
                          :options="deptOptions" :show-count="true" placeholder="请选择宠物品种"/>
            </el-form-item>
            <el-form-item label="价格" prop="petPrice">
              <el-input
                v-model="queryParams.petPrice"
                placeholder="请输入价格"
                clearable
                size="small"
                style="width: 200px"
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="姓名" v-if="isExpandAll" prop="petName">
              <el-input
                v-model="queryParams.petName"
                placeholder="请输入姓名"
                clearable
                size="small"
                style="width: 200px"
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="性别" v-if="isExpandAll" prop="petSex">
              <el-select v-model="queryParams.petSex" style="width: 200px" placeholder="请选择性别" clearable size="small">
                <el-option
                  v-for="dict in dict.type.animal_sex"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="年龄" v-if="isExpandAll" prop="petAge">
              <el-input
                v-model="queryParams.petAge"
                placeholder="请输入年龄关键字"
                clearable
                size="small"
                style="width: 200px"
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="健康状况" v-if="isExpandAll" label-width="68px" prop="petHealth">
              <el-input
                v-model="queryParams.petHealth"
                placeholder="请输入健康状况"
                clearable
                size="small"
                style="width: 200px"
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="性格" v-if="isExpandAll" prop="petCharacter">
              <el-input
                v-model="queryParams.petCharacter"
                placeholder="请输入性格"
                clearable
                size="small"
                style="width: 200px"
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="创建日期" v-if="isExpandAll" label-width="68px" prop="createTime">
              <el-date-picker clearable size="small"
                              v-model="queryParams.createTime"
                              type="date"
                              value-format="yyyy-MM-dd"
                              placeholder="选择日期"
                              style="width: 200px"
                              @keyup.enter.native="handleQuery">
              </el-date-picker>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
              <el-button
                type="info"
                plain
                icon="el-icon-sort"
                size="mini"
                @click="searchAll"
              >更多
              </el-button>
            </el-form-item>
          </el-form>
          <div v-show="showSearch">
            <el-divider></el-divider>
          </div>
          <el-row>
            <el-col :span="1.5">
              <el-button
                type="warning"
                plain
                icon="el-icon-download"
                size="mini"
                @click="handleExport"
                v-hasPermi="['adopt:pet:export']"
              >导出
              </el-button>
            </el-col>
            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" @change="changeHeight"></right-toolbar>
          </el-row>
        </div>
        <div class="content_slide" id="contentSlide" style="height: 510px">
          <div class="my_content" id="myContent" style="margin-top: 80px">
            <el-row style="margin-top: -20px">
              <el-col style="width: 520px" v-for="item in petList" :key="item.petId">
                <el-card style="margin: 10px" class="box-card">
                  <div slot="header" class="clearfix">
                    <span>{{ item.petName }}</span>
                    <el-button style="float: right; padding: 3px 0" type="text" @click="getDetail(item)">领养</el-button>
                  </div>
                  <div style="width: 500px">
                    <div style="width: 150px;float:left;">
                      <image-preview :src="item.petPhoto" :width="150" :height="150" style="margin-bottom: 10px"/>
                    </div>
                    <div style="width: 300px;float:left;margin-left:20px">
                      <div>
                        <span class="pet_title_class">
                          性别:
                          <span class="desc_carg">{{ item.petSex }}</span>
                        </span>
                      </div>
                      <div>
                        <span class="pet_title_class">
                          年龄:
                          <span class="desc_carg">{{ item.petAge }}</span>
                        </span>
                      </div>
                      <div>
                        <span class="pet_title_class">
                          性格:
                          <span class="desc_carg">{{ item.petCharacter }}</span>
                        </span>
                      </div>
                      <div>
                        <span class="pet_title_class">
                          品种:
                          <span class="desc_carg">{{ item.deptName }}</span>
                        </span>
                      </div>
                      <div>
                        <span class="pet_title_class">
                          健康状况:
                          <span class="desc_carg">{{ item.petHealth }}</span>
                        </span>
                      </div>
                      <div>
                        <span class="pet_title_class">
                          地址:
                          <span class="desc_carg">{{ item.petAddress }}</span>
                        </span>
                      </div>
                    </div>
                  </div>
                </el-card>
              </el-col>
            </el-row>
          </div>
        </div>
        <pagination
          v-show="total>0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          :page-sizes="[12,24,36,48]"
          @pagination="getList"
        />
      </el-tab-pane>
      <el-tab-pane label="列表视图">
        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="40px"
                 class="formClass">
          <el-form-item label="地址" prop="petAddress">
            <el-input
              v-model="queryParams.petAddress"
              placeholder="请输入地址"
              clearable
              size="small"
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="来源" prop="petSource">
            <el-input
              v-model="queryParams.petSource"
              placeholder="请输入来源关键字"
              clearable
              size="small"
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="品种" prop="petKind">
            <treeselect v-model="queryParams.petKind" style="width: 200px" :defaultExpandLevel=1 :options="deptOptions"
                        :show-count="true" placeholder="请选择宠物品种"/>
          </el-form-item>
          <el-form-item label="价格" prop="petPrice">
            <el-input
              v-model="queryParams.petPrice"
              placeholder="请输入价格"
              clearable
              size="small"
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="昵称" v-if="isExpandAll" prop="petName">
            <el-input
              v-model="queryParams.petName"
              placeholder="请输入昵称"
              clearable
              size="small"
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="性别" v-if="isExpandAll" prop="petSex">
            <el-select v-model="queryParams.petSex" style="width: 200px" placeholder="请选择性别" clearable size="small">
              <el-option
                v-for="dict in dict.type.animal_sex"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="年龄" v-if="isExpandAll" prop="petAge">
            <el-input
              v-model="queryParams.petAge"
              placeholder="请输入年龄"
              clearable
              size="small"
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="健康状况" v-if="isExpandAll" label-width="68px" prop="petHealth">
            <el-input
              v-model="queryParams.petHealth"
              placeholder="请输入健康状况"
              clearable
              size="small"
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="性格" v-if="isExpandAll" prop="petCharacter">
            <el-input
              v-model="queryParams.petCharacter"
              placeholder="请输入性格"
              clearable
              size="small"
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="创建日期" v-if="isExpandAll" label-width="68px" prop="createTime">
            <el-date-picker clearable
                            v-model="queryParams.createTime"
                            type="date"
                            value-format="yyyy-MM-dd"
                            placeholder="选择创建时间">
            </el-date-picker>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
            <el-button
              type="info"
              plain
              icon="el-icon-sort"
              size="mini"
              @click="searchAll"
            >更多
            </el-button>
          </el-form-item>
        </el-form>
        <div v-show="showSearch">
          <el-divider></el-divider>
        </div>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['adopt:pet:export']"
            >导出
            </el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" @change="changeHeight"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="petList" :height="tableHeight">
          <el-table-column label="操作" align="center" min-width="70px" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                type="text"
                plain
                icon="el-icon-cherry"
                size="mini"
                @click="getDetail(scope.row)"
                v-hasPermi="['adopt:pet:edit']"
              >领养
              </el-button>
            </template>
          </el-table-column>
          <el-table-column label="姓名" :show-overflow-tooltip="true" min-width="110px" align="center" prop="petName"/>
          <el-table-column label="性别" align="center" prop="petSex">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.animal_sex" :value="scope.row.petSex"/>
            </template>
          </el-table-column>
          <el-table-column label="年龄" :show-overflow-tooltip="true" min-width="110px" align="center" prop="petAge"/>
          <el-table-column label="品种" :show-overflow-tooltip="true" min-width="110px" align="center" prop="deptName"/>
          <el-table-column label="价格" :show-overflow-tooltip="true" min-width="110px" align="center" prop="petPrice"/>
          <el-table-column label="照片" align="center" prop="petPhoto" width="100">
            <template slot-scope="scope">
              <image-preview :src="scope.row.petPhoto" :width="50" :height="50"/>
            </template>
          </el-table-column>
          <el-table-column label="地址" :show-overflow-tooltip="true" min-width="200px" align="center" prop="petAddress"/>
          <el-table-column label="联系方式" min-width="200px" align="center" prop="petContact" :show-overflow-tooltip="true" />
          <el-table-column label="性格" :show-overflow-tooltip="true" min-width="110px" align="center"
                           prop="petCharacter"/>
          <el-table-column label="毛色" :show-overflow-tooltip="true" min-width="110px" align="center" prop="hairColor"/>
          <el-table-column label="健康状况" :show-overflow-tooltip="true" min-width="110px" align="center"
                           prop="petHealth"/>
          <el-table-column label="免疫情况" :show-overflow-tooltip="true" min-width="110px" align="center"
                           prop="immuneCondition"/>
          <el-table-column label="绝育情况" :show-overflow-tooltip="true" min-width="110px" align="center"
                           prop="sterilizationSituation"/>
          <el-table-column label="补充信息" :show-overflow-tooltip="true" min-width="110px" align="center"
                           prop="petSupplement"/>
          <el-table-column label="创建人" :show-overflow-tooltip="true" min-width="110px" align="center"
                           prop="createUserName"/>
          <el-table-column label="创建日期" min-width="200px" align="center" prop="createTime">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
            </template>
          </el-table-column>
          <el-table-column label="来源" :show-overflow-tooltip="true" min-width="110px" align="center" prop="petSource"/>
        </el-table>
        <pagination
          v-show="total>0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          :page-sizes="[12,24,36,48]"
          @pagination="getList"
        />
      </el-tab-pane>
    </el-tabs>

    <!-- 领养宠物对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="800px" class="dialog_slide" append-to-body>
      <div class="item_style" style="margin-top: -10px">
        <el-row>
          <el-col>
            <h3>一、宠物信息</h3>
          </el-col>
        </el-row>
        <el-descriptions style="margin-left: 25px;margin-top: -20px">
          <el-descriptions-item label="姓名">
            {{ petForm.petName }}
          </el-descriptions-item>
          <el-descriptions-item label="性别" content-class-name="desc_content">
            {{ petForm.petSex }}
          </el-descriptions-item>
          <el-descriptions-item label="年龄">
            {{ petForm.petAge }}
          </el-descriptions-item>
          <el-descriptions-item label="毛色">
            {{ petForm.hairColor }}
          </el-descriptions-item>
          <el-descriptions-item label="性格">
            {{ petForm.petCharacter }}
          </el-descriptions-item>
          <el-descriptions-item label="品种" content-class-name="desc_content">
            {{ petForm.deptName }}
          </el-descriptions-item>
          <el-descriptions-item label="价格">
            {{ petForm.petPrice }}
          </el-descriptions-item>
          <el-descriptions-item label="来源" content-class-name="desc_content">
            {{ petForm.petSource }}
          </el-descriptions-item>
          <el-descriptions-item label="健康状况">
            {{ petForm.petHealth }}
          </el-descriptions-item>
          <el-descriptions-item label="免疫情况" content-class-name="desc_content">
            {{ petForm.immuneCondition }}
          </el-descriptions-item>
          <el-descriptions-item label="绝育情况">
            {{ petForm.sterilizationSituation }}
          </el-descriptions-item>
          <el-descriptions-item label="联系方式">
            {{ petForm.petContact }}
          </el-descriptions-item>
          <el-descriptions-item label="补充信息" content-class-name="long_desc_content">
            {{ petForm.petSupplement }}
          </el-descriptions-item>
          <el-descriptions-item label="地址" content-class-name="long_desc_content">
            {{ petForm.petAddress }}
          </el-descriptions-item>
          <el-descriptions-item label="照片" style="margin-left: -20px">
            <div style="width: 650px;margin-top: 5px">
              <div style="width: 160px;float:left" v-for="photo in petForm.petPhoto">
                <image-preview :src="photo" :width="150" :height="150"/>
              </div>
            </div>
          </el-descriptions-item>
        </el-descriptions>
      </div>
      <el-form ref="form" :model="form" :rules="rules" class="petForm">
        <div class="item_style">
          <el-row>
            <el-col>
              <h3>二、个人信息</h3>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="昵称" label-width="80px" prop="petName">
                <el-input v-model="form.applicantName" disabled placeholder="请完善个人信息"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="联系方式" label-width="80px" prop="applicantContact">
                <el-input v-model="form.applicantContact" placeholder="请输入联系方式"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="补充说明" label-width="80px" prop="petName">
              <el-input type="textarea" rows="3" v-model="form.supplyment"
                        placeholder="可填写家中其他宠物情况、个人经济情况、领养原因、是否接受回访等"/>
            </el-form-item>
          </el-row>
        </div>
        <div class="item_style">
          <el-row>
            <el-col>
              <h3>三、领养问卷</h3>
            </el-col>
          </el-row>
          <el-row style="margin: 1px 20px 1px 35px">
            <el-form-item label="1.你可以接受每月为TA花多少钱？" prop="firstQuestion">
              <el-input v-model="form.firstQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="2.如果TA生病了需要耗费大量金钱，你愿意尝试治疗TA吗？" prop="secondQuestion">
              <el-input v-model="form.secondQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="3.确定跟室友或家人达成一致了吗？" prop="thirdQuestion">
              <el-input v-model="form.thirdQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="4.如果未来决定要孩子，你嫌弃TA吗？" prop="forthQuestion">
              <el-input v-model="form.forthQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="5.你愿意为了保护TA给家里安上纱窗吗？" prop="fifthQuestion">
              <el-input v-model="form.fifthQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="6.如果有一天实在不能继续养了，你有能力好好安置TA吗？" prop="sixthQuestion">
              <el-input v-model="form.sixthQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="7.如果跟家里的原住民不和，你可以解决吗？" prop="seventhQuestion">
              <el-input v-model="form.seventhQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="8.如果它在晚上发出声响影响你休息，你能忍受吗？" prop="eighthQuestion">
              <el-input v-model="form.eighthQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="9.如果它在家里乱尿或者挠坏家具，你能耐心教育吗？" prop="ninthQuestion">
              <el-input v-model="form.ninthQuestion" placeholder="请输入"/>
            </el-form-item>
            <el-form-item label="10.你有时间陪伴TA吗？" prop="tenQuestion">
              <el-input v-model="form.tenQuestion" placeholder="请输入"/>
            </el-form-item>
          </el-row>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer" style="margin-bottom: 20px;margin-right: 20px">
        <el-button type="primary" @click="apply">申请领养</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {listPet, getPet} from "@/api/adopt/pet";
import {addRecord} from "@/api/adopt/record";
import {treeselect} from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";

export default {
  name: "Adopt",
  components: {Treeselect},
  dicts: ['sys_yes_no', 'animal_sex'],
  data() {
    return {
      // 部门树选项
      deptOptions: undefined,
      tableHeight: 520,
      // 遮罩层
      loading: true,
      // 显示搜索条件
      showSearch: true,
      //默认不显示
      isExpandAll: false,
      // 总条数
      total: 0,
      // 宠物表格数据
      petList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        currentUserId:this.$store.state.user.id,
        createUserId: null,
        pageNum: 1,
        pageSize: 12,
        petAddress: null,
        petSource: null,
        petKind: null,
        petPrice: null,
        petName: null,
        petSex: null,
        petAge: null,
        petNumber: null,
        petHealth: null,
        petCharacter: null,
        createTime: null,
        petSupplement: null,
        isDelete: "0",
        isAdopted: "0",
      },
      // 表单参数
      form: {
        nickName: "zs"
      },
      petForm: {},
      // 表单校验
      rules: {
        applicantContact: {required: true, trigger: 'blur', message: "请完善个人信息"},
        firstQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        secondQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        thirdQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        forthQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        fifthQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        sixthQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        seventhQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        eighthQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        ninthQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
        tenQuestion: {required: true, trigger: 'blur', message: "请完善问卷信息"},
      }
    }
  },
  created() {
    this.getList();
    this.getTreeselect();
  },
  // 表格高度自适应
  mounted() {
    this.$nextTick(function () {
      this.getHeight();
    })
    window.addEventListener('resize', this.getHeight, false)
  },
  methods: {
    /** 查询部门下拉树结构 */
    getTreeselect() {
      treeselect().then(response => {
        this.deptOptions = response.data;
      });
    },
    /** 展开/折叠操作 */
    searchAll() {
      this.isExpandAll = !this.isExpandAll;
      this.$nextTick(function () {
        this.getHeight();
      })
    },
    changeHeight() {
      this.$nextTick(function () {
        this.getHeight();
      })
    },
    getHeight() {
      //listView
      const _this = this;
      let height1 = document.defaultView.getComputedStyle(_this.$el, null)["padding-top"];
      height1 = height1.replace("px", "");
      let height2 = document.getElementsByClassName("el-table")[0].offsetTop;
      _this.tableHeight = document.documentElement.clientHeight - height2 - height1 - 210 + "px";

      //cardView
      document.getElementById("myContent").style.marginTop = document.getElementById("myForm").offsetHeight - 16 + "px";
      document.getElementById("contentSlide").style.height = document.documentElement.clientHeight - document.getElementById("myForm").offsetHeight - 245 + "px";
      // console.log("--------------------");
      // console.log("clientHeight="+document.documentElement.clientHeight);
      // console.log("margin-top="+document.getElementById("myContent").style.marginTop);
      // console.log("height="+document.getElementById("contentSlide").style.height);
    },
    /** 查询宠物列表 */
    getList() {
      this.loading = true;
      listPet(this.queryParams).then(response => {
        this.petList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    apply() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          addRecord(this.form).then(response => {
            this.$modal.msgSuccess("申请成功");
            this.open = false;
            this.getList();
          });
        }
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        applyRecordId: null,
        applicantId: null,
        applicantName: null,
        applicantContact: null,
        supplyment: null,
        applyTime: null,
        petId: null,
        firstQuestion: null,
        secondQuestion: null,
        thirdQuestion: null,
        forthQuestion: null,
        fifthQuestion: null,
        sixthQuestion: null,
        seventhQuestion: null,
        eighthQuestion: null,
        ninthQuestion: null,
        tenQuestion: null,
        status: "apply"
      };
      this.petForm = {
        petPhoto: ""
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** 详情按钮操作 */
    getDetail(item) {
      this.reset();
      const petId = item.petId;
      getPet(petId).then(response => {
        this.petForm = response.data;
        this.petForm.petPhoto = this.petForm.petPhoto.split(',');
        this.form.petId = this.petForm.petId;
        this.form.applicantId = this.$store.state.user.id;
        this.form.applicantName = this.$store.state.user.nickName;
        // this.form.applicantContact=this.$store.state.user.phone;
        this.open = true;
        this.title = "我要领养";
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('adopt/pet/export', {
        ...this.queryParams
      }, `pet_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
<style lang="scss" scoped>
.item_style {
  border: 1px dashed #bdbdbd;
  margin-bottom: 10px;
  padding: 0 10px 0 10px;
}

.desc_content {
  margin-left: 20px;
  background: #E1F3D8;
}

.long_desc_content {
  display: block;
  background: #E1F3D8;
}

.el-divider--horizontal {
  margin: 5px 0 14px;
  background: 0 0;
  border-top: 1px solid #e8eaec;
}

//对话框高度过长时 设置对话框上下滑动
.content_slide {
  display: flex;
  overflow: hidden;

  .my_content {
    position: absolute;
    top: 40px;
    bottom: 50px;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 1;
    overflow: hidden;
    overflow-y: auto;
  }
}

.pet_title_class {
  font-size: 14px;
  color: rgb(105, 101, 101);
}

.desc_carg {
  font-size: 13px;
  color: #999;
  word-wrap: break-word;
}
</style>
